/**
* Copyright @ 2023 iAuto (Shanghai) Co., Ltd.
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are NOT permitted except as agreed by
* iAuto (Shanghai) Co., Ltd.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
//
const projectData = (blocks) => {
  const spriteCostumes = [
    {
      assetId: 'b7853f557e4426412e64bb3da6531a99',
      name: 'costume{index}',
      bitmapResolution: 1,
      md5ext: 'b7853f557e4426412e64bb3da6531a99.svg',
      dataFormat: 'svg',
      rotationCenterX: 48,
      rotationCenterY: 50,
    },
    {
      assetId: 'e6ddc55a6ddd9cc9d84fe0b4c21e016f',
      name: 'costume{index}',
      bitmapResolution: 1,
      md5ext: 'e6ddc55a6ddd9cc9d84fe0b4c21e016f.svg',
      dataFormat: 'svg',
      rotationCenterX: 46,
      rotationCenterY: 53,
    },
  ];

  const spriteSounds = [];
  const stageSounds = [];

  const sprite = {
    isStage: false,
    name: 'Sprite{index}',
    variables: {},
    lists: {},
    broadcasts: {},
    blocks: blocks || {},
    currentCostume: 0,
    costumes: spriteCostumes,
    sounds: spriteSounds,
    volume: 100,
    visible: true,
    x: 0,
    y: 0,
    size: 100,
    direction: 90,
    draggable: false,
    rotationStyle: 'all around',
  };

  const stage = {
    isStage: true,
    name: 'Stage',
    variables: {
      '`jEk@4|i[#Fk?(8x)AV.-my variable': ['my variable', 0],
    },
    lists: {},
    broadcasts: {},
    blocks: {},
    currentCostume: 0,
    costumes: [
      {
        assetId: 'cd21514d0531fdffb22204e0ec5ed84a',
        name: 'backdrop{index}',
        md5ext: 'cd21514d0531fdffb22204e0ec5ed84a.svg',
        dataFormat: 'svg',
        rotationCenterX: 240,
        rotationCenterY: 180,
      },
    ],
    sounds: stageSounds,
    volume: 100,
  };

  const targets = [stage, sprite];

  const meta = {
    semver: '3.0.0',
    vm: '0.1.0',
    agent:
      'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36',
  };

  return {
    targets,
    meta,
  };
};

export default projectData;